#ifndef CChckLBxH
#define CChckLBxH

#include <SysUtils.hpp>
#include <Controls.hpp>
#include <Classes.hpp>
#include <Forms.hpp>
#include <checklst.hpp>
#include <StdCtrls.hpp>
#include "CtrlStd.h"


class PACKAGE_CTRLSTD CCheckListBox : public TCheckListBox
{
private:
  bool FReadOnly;
  bool FObligatoire;
  bool FBleuSiHint;
  TCorrectementRempliEvent FpfnOnEstCorrectementRempli;
  TWndMethod OldWndProc_Parent;
  TWinControl *FOldParent;
  void __fastcall SetEnabled(bool bEnabled);
  void __fastcall SetReadOnly(bool bReadOnly);
  bool __fastcall GetEnabled();
  void __fastcall SetObligatoire( bool bObligatoire);
  void __fastcall WndProc_Parent( TMessage &Message );
  void __fastcall SetBleuSiHint( bool bBleuSiHint);

protected:
  virtual void __fastcall DrawItem(int Index, const TRect &Rect, TOwnerDrawState State);
  virtual void __fastcall SetParent(TWinControl* AParent);

public:
  __fastcall CCheckListBox(TComponent* Owner);
  virtual __fastcall ~CCheckListBox();

  void __fastcall ExchangeItems( int a, int b);
  bool __fastcall EstCorrectementRempliDefault( void);

__published:
  __property bool Enabled  = {read = GetEnabled,write = SetEnabled,default = true};
  __property bool ReadOnly = {read = FReadOnly,write = SetReadOnly,default = false};
  __property bool Obligatoire = { read = FObligatoire,write = SetObligatoire,default = false};
  __property TCorrectementRempliEvent OnEstCorrectementRempli = { read=FpfnOnEstCorrectementRempli, write=FpfnOnEstCorrectementRempli};
  __property bool BleuSiHint = { read = FBleuSiHint,write = SetBleuSiHint,default = false};
};




#endif
